﻿using System.Windows;

namespace VisualStock.Modules.StockSymbols.ComparingSymbols
{
    public partial class ComparingSymbolListViewModel
    {
        private void OnAddExcuted(string newComparingSymbol)
        {
            if (!this.CanAddExcuted(newComparingSymbol))
            {
                MessageBox.Show("Adding symbol failed.Please check your symbol name.");
                return;
            }
            AddNewSymbolWindowView window =
                new AddNewSymbolWindowViewModel(
                    newComparingSymbol,
                    new AddNewSymbolWindowView(),
                    this.historicalDataService).View;
            window.Show();
        }
    }
}
